<template>
	<view>

		<view class="text">
			若你忘记了密码，可在此重置新密码。
		</view>
		<view class="inp">
			<uni-easyinput v-model="number" :inputBorder="false" placeholder="请输入手机号码"></uni-easyinput>
		</view>
		<view class="inp">
			<uni-easyinput v-model="password" :inputBorder="false" type="password" placeholder="请输入新密码"></uni-easyinput>
		</view>

		<view class="inp">
			<uni-easyinput :inputBorder="false" placeholder="验证码"></uni-easyinput>
		</view>

		<view class="button" @tap="ok">
			重置密码
		</view>




	</view>
</template>

<script>
	import WxValidate from "@/utils/validate.js"
	import {
		register,
		resetPassword
	} from "@/api/mine/mine.js"
	import baseUrl from "@/api/baseUrl.js"
	export default {
		data() {
			return {
				number: '',
				password: ''
			}
		},
		onLoad() {

		},
		methods: {

			ok(){
				resetPassword(this.number).then(res=>{
					console.log(res)
					if(res.success){
						uni.showToast({
							title:'操作成功'
						})
						setTimeout(()=>{
							uni.navigateTo({
								url:"/pages/mine/login/login"
							})
						},1000)
					}else{
						uni.showToast({
							title:`${res.message}`,
							icon:'none'
						})
					}
				})
			}

		}
	}
</script>

<style lang="scss" scoped>
	.inp {
		margin: 30rpx auto;
		width: 80%;
		padding: 15rpx;
		
		border-radius: 2.5rem;
		
		box-shadow: 0 0 20rpx 0 #d9d9d9;


	}

	.button {
		width: 600rpx;
		height: 100rpx;
		border-radius: 50rpx;
		background-color: #354e44;
		color: #fff;
		line-height: 100rpx;
		text-align: center;
		margin: 100rpx auto;
	}


	.text {
		
		color: #999;
		font-size: 28rpx;
		margin-top: 64rpx;
		
		text-align: center;
	}
</style>
